Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support stripping metadata from updates. #25

Merged
merged 2 commits into from
Aug 16, 2022
Merged

Conversation

facetoe
Copy link
Collaborator

@facetoe facetoe commented Aug 14, 2022

Updates metadata can be quite large and cause systems with low memory to
OOM refreshing it. Add support for dropping from the metadata
architectures that are not in use in any system the mirror serves. This
is achieved in much the same way as snapshotting is implemneted: pull
metadata, rewrite, update the various values like checksum and size so
DNF is happy to consume it and add to repomd.xml.

Some refactoring was performed as much of the code used for snapshotting
is also useful here.

@facetoe facetoe force-pushed the will-strip-metadata branch 2 times, most recently from 6a6db32 to 8b8d15d Compare August 14, 2022 12:45
@facetoe facetoe marked this pull request as ready for review August 14, 2022 12:48
Updates metadata can be quite large and cause systems with low memory to
OOM refreshing it. Add support for dropping from the metadata
architectures that are not in use in any system the mirror serves. This
is achieved in much the same way as snapshotting is implemneted: pull
metadata, rewrite, update the various values like checksum and size so
DNF is happy to consume it and add to repomd.xml.

Some refactoring was performed as much of the code used for snapshotting
is also useful here.
@facetoe facetoe force-pushed the will-strip-metadata branch from 8b8d15d to 510cc59 Compare August 14, 2022 23:20
@facetoe facetoe marked this pull request as draft August 14, 2022 23:41
@facetoe facetoe marked this pull request as ready for review August 15, 2022 12:33
Follow on from previous commit and support stripping xz metadata also.
@facetoe facetoe force-pushed the will-strip-metadata branch from 510cc59 to 40654a1 Compare August 15, 2022 22:58
Copy link
Contributor

@lionbee lionbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I can't lie, tests would be great... but let's see if we can get this sucker to prod and if it help sad services

@lionbee lionbee merged commit 18c5aa9 into master Aug 16, 2022
@alexanderfomichev alexanderfomichev deleted the will-strip-metadata branch August 16, 2022 01:17
target_arches: Tuple[str],
scratch_dir: str,
):
sync_files, upload_files = [], []
Copy link
Contributor

@nicois nicois Aug 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: sync_files is never modified, which makes mypy sad.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might see about adding mypy lint step and adding proper typing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants